<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let shijian = +prompt('请输入秒数')
        function gettime(time = 0) {
            let h = parseInt(time / 60 / 60 % 24)
            let s = parseInt(time / 60 % 60)
            let m = parseInt(time % 60)
            h = h < 10 ? '0' + h : h
            s = s < 10 ? '0' + s : s
            m = m < 10 ? '0' + m : m
            document.write(`转换之后时间为${h}小时${s}分钟${m}秒`)
        }
        gettime(shijian)

    </script>
</body>

</html>